<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>旋转</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        .outer {
            width: 200px;
            height: 200px;
            border: 2px solid black;
            margin: 0 auto;
            margin-top: 100px;
            position: relative;
            transform-style: preserve-3d;
            perspective: 500px;
            perspective-origin: 80px 80px;

        }
        .inner {
            width: 200px;
            height: 200px;
            background-color: skyblue;
            transform: rotateY(0deg) rotateX(0deg);

            /* rotate3d几乎不用 */
            /* transform: rotate3d(1,0,0,30deg); */
        }
    </style>
</head>
<body>
<div class="outer">
    <div class="inner">
        你好啊
    </div>
</div>
</body>
</html>